<template>
    <div class="home-wrapper">
            <project-menu :detail="projectDetail" :pid="projectId"></project-menu>
            <div class="filters-wrapper">
                <div class="title total_title">素材</div>
                <el-row :gutter="30" type="flex" justify="start">
                    <div class="sc_jump button-glow">
                        <router-link :to="{path: '/material/project/' + projectId}">项目素材库</router-link>
                    </div>
                    <div class="sc_jump button-glow">
                        <router-link :to="{path: '/material/person/' + projectId}">个人素材库</router-link>
                    </div>
                    <div class="sc_jump button-glow">
                        <router-link :to="{path: '/creative/' + projectId}">创意包</router-link>
                    </div>
                </el-row>
            </div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                projectId: 0,
                projectDetail: {},
            }
        },
        created() {
            this.projectId = this.$router.currentRoute.params.id
        },
        mounted() {
            // this.projectId = this.$router.currentRoute.params.id
            this.loadData()
        },
        methods: {
            loadData() {
                this.$axios.get('/project/detail', {projectid: this.projectId})
                .then(e => {
                    // let data = e.data
                    // console.log('项目详情', e.data)
                    this.projectDetail = e.data
                })
            }
        }
    }
</script>